<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<!-- Mirrored from www.wolfssl.com/wolfSSL/Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Jan 2017 13:33:04 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=UTF-8" /><!-- /Added by HTTrack -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="Generator" content="iWeb 3.0.4"/>
<meta name="iWeb-Build" content="local-build-20170103"/>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
<meta name="viewport" content="width=770"/>
<title>wolfSSL - Docs | wolfSSL Manual - Chapter 17.2 (API Reference, Certificates and Keys)</title>
<link rel="stylesheet" type="text/css" media="screen,print" href="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys.css"/>
<!--[if lt IE 8]><link rel='stylesheet' type='text/css' media='screen,print' href='Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keysIE.css'/><![endif]-->
<!--[if gte IE 8]><link rel='stylesheet' type='text/css' media='screen,print' href='Media/IE8.css'/><![endif]-->
<script type="text/javascript" src="Scripts/iWebSite.js"></script>
<script type="text/javascript" src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys.js"></script>
<meta name="description" content="wolfSSL (formerly CyaSSL) API reference functions related to loading certificates and keys into CyaSSL."/><meta name="keywords" content="embedded ssl, ssl library, lightweight ssl, open source ssl, open source web server, tls 1.2, embedded security, small openssl, smart grid, connected home, ecc, suite b, fips, encryption security software, ssl inspection"/><meta name="robots" content="follow,index"/> <script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','../../www.google-analytics.com/analytics.js','ga');ga('create','UA-64826966-1','auto');ga('send','pageview');</script>
 
<script>//<![CDATA[
window.zEmbed||function(e,t){var n,o,d,i,s,a=[],r=document.createElement("iframe");window.zEmbed=function(){a.push(arguments)},window.zE=window.zE||window.zEmbed,r.src="javascript:false",r.title="",r.role="presentation",(r.frameElement||r).style.cssText="display: none",d=document.getElementsByTagName("script"),d=d[d.length-1],d.parentNode.insertBefore(r,d),i=r.contentWindow,s=i.document;try{o=s}catch(c){n=document.domain,r.src='javascript:var d=document.open();d.domain="'+n+'";void(0);',o=s}o.open()._l=function(){var o=this.createElement("script");n&&(this.domain=n),o.id="js-iframe-async",o.src=e,this.t=+new Date,this.zendeskHost=t,this.zEQueue=a,this.body.appendChild(o)},o.write('<body onload="document._l();">'),o.close()}("../../assets.zendesk.com/embeddable_framework/main.js","wolfssl.zendesk.com");
//]]></script>
  </head>
<body style="background: rgb(255, 255, 255); margin: 0pt; " onload="onPageLoad();">
<div style="text-align: center; ">
<div style="margin-bottom: 20px; margin-left: auto; margin-right: auto; margin-top: 20px; overflow: hidden; position: relative; word-wrap: break-word;  background: rgb(255, 255, 255); text-align: left; width: 770px; " id="body_content">
<div style="float: left; margin-left: 0px; position: relative; width: 770px; z-index: 0; " id="nav_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
<div style="clear: both; height: 0px; line-height: 0px; " class="spacer"> </div>
</div>
<div style="float: left; height: 0px; line-height: 0px; margin-left: 0px; position: relative; width: 770px; z-index: 10; " id="header_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
</div>
<div style="margin-left: 0px; position: relative; width: 770px; z-index: 5; " id="body_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
<div id="id1" style="height: 38px; left: 375px; position: absolute; top: 157px; width: 361px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_361_38" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style">wolfSSL Manual</p>
</div>
</div>
</div>
<div id="id2" style="height: 24px; left: 193px; position: absolute; top: 122px; width: 268px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_268_24" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_1"><a class="class1" title="Docs.html" href="Docs.html">Docs</a> <span class="style">-&gt;</span> <span class="style_1">wolfSSL Manual</span></p>
</div>
</div>
</div>
<div style="height: 1px; width: 698px;  height: 1px; left: 37px; position: absolute; top: 220px; width: 698px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 698px; ">
<img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_1.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 698px; "/>
</div>
</div>
<div style="height: 37px; width: 545px;  height: 37px; left: 191px; position: absolute; top: 80px; width: 545px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 545px; ">
<img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_2.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 545px; "/>
</div>
</div>
<div id="id3" style="height: 25px; left: 200px; position: absolute; top: 84px; width: 43px; z-index: 1; " class="style_SkipStroke_1 shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_43_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_2"><a class="class2" title="Home.html" href="Home.html">Home</a></p>
</div>
</div>
</div>
<div id="id4" style="height: 25px; left: 365px; position: absolute; top: 84px; width: 72px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_72_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_3"><a class="class3" title="https://wolfssl.com/wolfSSL/download/downloadForm.php" href="https://wolfssl.com/wolfSSL/download/downloadForm.php">Download</a></p>
</div>
</div>
</div>
<div id="id5" style="height: 25px; left: 439px; position: absolute; top: 84px; width: 59px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_59_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_3"><a class="class4" title="License.html" href="License.html">License</a></p>
</div>
</div>
</div>
<div id="id6" style="height: 25px; left: 499px; position: absolute; top: 84px; width: 44px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_44_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_3"><a class="class5" title="Blog/Blog.html" href="Blog/Blog.html">Blog</a></p>
</div>
</div>
</div>
<div id="id7" style="height: 25px; left: 589px; position: absolute; top: 84px; width: 80px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_80_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_3"><a class="class6" title="Community.html" href="Community.html">Community</a></p>
</div>
</div>
</div>
<div style="height: 36px; width: 1px;  height: 36px; left: 245px; position: absolute; top: 81px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_3.png" alt="" style="height: 36px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 37px; width: 1px;  height: 37px; left: 296px; position: absolute; top: 80px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_4.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 36px; width: 1px;  height: 36px; left: 363px; position: absolute; top: 81px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_5.png" alt="" style="height: 36px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 36px; width: 1px;  height: 36px; left: 438px; position: absolute; top: 81px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_6.png" alt="" style="height: 36px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 37px; width: 1px;  height: 37px; left: 498px; position: absolute; top: 80px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_7.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 37px; width: 1px;  height: 37px; left: 589px; position: absolute; top: 80px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_8.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div id="id8" style="height: 25px; left: 671px; position: absolute; top: 84px; width: 61px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_61_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_3"><a class="class7" title="Contact.html" href="Contact.html">Contact</a></p>
</div>
</div>
</div>
<div id="id9" style="height: 25px; left: 249px; position: absolute; top: 84px; width: 44px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_44_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_2"><a class="class8" title="About.html" href="About.html">About</a></p>
</div>
</div>
</div>
<div style="height: 36px; width: 1px;  height: 36px; left: 670px; position: absolute; top: 81px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_9.png" alt="" style="height: 36px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div id="id10" style="height: 25px; left: 298px; position: absolute; top: 84px; width: 63px; z-index: 1; " class="style_SkipStroke_1 shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_63_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_3"><a class="class9" title="Products.html" href="Products.html">Products</a></p>
</div>
</div>
</div>
<div id="id11" style="height: 25px; left: 549px; position: absolute; top: 84px; width: 41px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_41_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_2"><a class="class10" title="Docs.html" href="Docs.html">Docs</a></p>
</div>
</div>
</div>
<div style="height: 37px; width: 1px;  height: 37px; left: 545px; position: absolute; top: 80px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_10.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div id="id12" style="height: 27px; left: 634px; position: absolute; top: 224px; width: 102px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_102_27" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_4"><a class="class11" title="Docs-wolfssl-manual-17-3-wolfssl-api-context-session-setup.html" href="Docs-wolfssl-manual-17-3-wolfssl-api-context-session-setup.html">Next Chapter</a></p>
</div>
</div>
</div>
<div id="id13" style="height: 25px; left: 35px; position: absolute; top: 224px; width: 125px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_125_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_5"><a class="class12" title="Docs-wolfssl-manual-17-1-wolfssl-api-init-shutdown.html" href="Docs-wolfssl-manual-17-1-wolfssl-api-init-shutdown.html">Previous Chapter</a></p>
</div>
</div>
</div>
<div id="id14" style="height: 27px; left: 59px; position: absolute; top: 190px; width: 196px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_196_27" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_6"><a class="class13" title="https://www.wolfssl.com/documentation/wolfSSL-Manual.pdf" href="https://www.wolfssl.com/documentation/wolfSSL-Manual.pdf">Download wolfSSL Manual (PDF)</a></p>
</div>
</div>
</div>
<div style="height: 22px; width: 22px;  height: 22px; left: 33px; position: absolute; top: 191px; width: 22px; z-index: 1; " class="tinyText style_SkipStroke_2">
<img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/PDF.png" alt="" style="border: none; height: 22px; width: 22px; "/>
</div>
<div id="id15" style="height: 25px; left: 323px; position: absolute; top: 224px; width: 125px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_125_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_7"><a title="Docs-wolfssl-manual-toc.html" href="Docs-wolfssl-manual-toc.html">Table of Contents</a></p>
</div>
</div>
</div>
<div id="id16" style="height: 12223px; left: 35px; position: absolute; top: 281px; width: 701px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_701_12223" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-top: 0pt; " class="paragraph_style_8">Chapter 17: wolfSSL API Reference<br/></p>
<p class="paragraph_style_8"><br/></p>
<p class="paragraph_style_9">17.2  Certificates and Keys<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_10">The functions in this section have to do with loading certificates and keys into wolfSSL.<span class="style_2"><br/></span></p>
<p class="paragraph_style_11"><br/></p>
<p class="paragraph_style_11"><br/></p>
<div class="paragraph paragraph_style_11"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_11.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_11"><br/></p>
<p class="paragraph_style_12"><br/></p>
<p class="paragraph_style_12">CyaSSL_CTX_load_verify_buffer<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_10">int CyaSSL_CTX_load_verify_buffer(CYASSL_CTX* ctx, const unsigned char* in,                                                                   long sz, int format);<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_10">This function loads a CA certificate buffer into the CYASSL Context.  It behaves like the non buffered version, only differing in its ability to be called with a buffer as input instead of a file.  The buffer is provided by the <span class="style_3">in</span> argument of size <span class="style_3">sz</span>.  <span class="style_3">format</span> specifies the format type of the buffer; <span class="style_3">SSL_FILETYPE_ASN1</span> or <span class="style_3">SSL_FILETYPE_PEM</span>.  More than one CA certificate may be loaded per buffer as long as the format is in PEM.  Please see the examples for proper usage.   <br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_10">If successful the call will return SSL_SUCCESS.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">SSL_BAD_FILETYPE</span> will be returned if the file is the wrong format.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">SSL_BAD_FILE</span> will be returned if the file doesn’t exist, can’t be read, or is corrupted.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">MEMORY_E</span> will be returned if an out of memory condition occurs.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ASN_INPUT_E</span> will be returned if Base16 decoding fails on the file.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">BUFFER_E</span> will be returned if a chain buffer is bigger than the receiving buffer.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ctx</span> - pointer to the SSL context, created with CyaSSL_CTX_new().<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">in</span> - pointer to the CA certificate buffer<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">sz</span> - size of the input CA certificate buffer, <span class="style_3">in</span>.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">format</span> - format of the buffer certificate, either <span class="style_3">SSL_FILETYPE_ASN1</span> or <span class="style_3">SSL_FILETYPE_PEM</span>.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_14">int ret = 0;<br/></p>
<p class="paragraph_style_14">int sz = 0;<br/></p>
<p class="paragraph_style_14">CYASSL_CTX* ctx;<br/></p>
<p class="paragraph_style_14">byte certBuff[...];<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">ret = CyaSSL_CTX_load_verify_buffer(ctx, certBuff, sz, SSL_FILETYPE_PEM);<br/></p>
<p class="paragraph_style_14">if (ret != SSL_SUCCESS) {<br/></p>
<p class="paragraph_style_14">// error loading CA certs from buffer<br/></p>
<p class="paragraph_style_14">}<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_load_verify_locations<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_certificate_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_PrivateKey_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_NTRUPrivateKey_file<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_certificate_chain_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_certificate_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_PrivateKey_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_certificate_chain_buffer<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><br/></p>
<div class="paragraph paragraph_style_10"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_12.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_12"><br/></p>
<p class="paragraph_style_12">CyaSSL_CTX_load_verify_locations<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_10">int CyaSSL_CTX_load_verify_locations(CYASSL_CTX* ctx, const char* file,<br/></p>
<p class="paragraph_style_10">                                                                        const char* path);<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_10">This function loads PEM-formatted CA certificate files into the SSL context (CYASSL_CTX).  These certificates will be treated as trusted root certificates and used to verify certs received from peers during the SSL handshake.  <br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10">The root certificate file, provided by the <span class="style_3">file</span> argument, may be a single certificate or a file containing multiple certificates.  If multiple CA certs are included in the same file, CyaSSL will load them in the same order they are presented in the file.  The <span class="style_3">path</span> argument is a pointer to the name of a directory that contains certificates of trusted root CAs. If the value of <span class="style_3">file</span> is not NULL, <span class="style_3">path</span> may be specified as NULL if not needed.  If <span class="style_3">path</span> is specified and NO_CYASSL_DIR was not defined when building the library, CyaSSL will load all CA certificates located in the given directory.  <br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10">Please see the examples for proper usage.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_10">If successful the call will return <span class="style_3">SSL_SUCCESS</span>.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">SSL_FAILURE</span> will be returned if <span class="style_3">ctx</span> is NULL, or if both <span class="style_3">file</span> and <span class="style_3">path</span> are NULL.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">SSL_BAD_FILETYPE</span> will be returned if the file is the wrong format.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">SSL_BAD_FILE</span> will be returned if the file doesn’t exist, can’t be read, or is corrupted.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">MEMORY_E</span> will be returned if an out of memory condition occurs.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ASN_INPUT_E</span> will be returned if Base16 decoding fails on the file.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">BUFFER_E</span> will be returned if a chain buffer is bigger than the receiving buffer.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">BAD_PATH_ERROR</span> will be returned if opendir() fails when trying to open <span class="style_3">path</span>.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ctx</span> - pointer to the SSL context, created with CyaSSL_CTX_new().<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">file</span> - pointer to name of the file containing PEM-formatted CA certificates<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">path</span> - pointer to the name of a directory to load PEM-formatted certificates from.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_14">int ret = 0;<br/></p>
<p class="paragraph_style_14">CYASSL_CTX* ctx;<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">ret = CyaSSL_CTX_load_verify_locations(ctx, “./ca-cert.pem”, 0);<br/></p>
<p class="paragraph_style_14">if (ret != SSL_SUCCESS) {<br/></p>
<p class="paragraph_style_14">// error loading CA certs<br/></p>
<p class="paragraph_style_14">}<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_load_verify_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_certificate_file<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_PrivateKey_file<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_NTRUPrivateKey_file<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_certificate_chain_file<br/></p>
<p class="paragraph_style_10">CyaSSL_use_certificate_file<br/></p>
<p class="paragraph_style_10">CyaSSL_use_PrivateKey_file<br/></p>
<p class="paragraph_style_10">CyaSSL_use_certificate_chain_file<br/></p>
<p class="paragraph_style_11"><br/></p>
<p class="paragraph_style_11"><br/></p>
<div class="paragraph paragraph_style_11"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_13.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_11"><br/></p>
<p class="paragraph_style_12"><br/></p>
<p class="paragraph_style_12">CyaSSL_CTX_use_PrivateKey_buffer<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_10">int CyaSSL_CTX_use_PrivateKey_buffer(CYASSL_CTX* ctx, const unsigned char* in,                                                    long sz, int format);<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_10">This function loads a private key buffer into the SSL Context.  It behaves like the non buffered version, only differing in its ability to be called with a buffer as input instead of a file.  The buffer is provided by the in argument of size <span class="style_3">sz</span>.  <span class="style_3">format</span> specifies the format type of the buffer; <span class="style_3">SSL_FILETYPE_ASN1or</span> <span class="style_3">SSL_FILETYPE_PEM</span>.  Please see the examples for proper usage.   <br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_10">If successful the call will return <span class="style_3">SSL_SUCCESS</span>.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">SSL_BAD_FILETYPE</span> will be returned if the file is the wrong format.<br/></p>
<p class="paragraph_style_15"><br/></p>
<p class="paragraph_style_10"><span class="style_3">SSL_BAD_FILE</span> will be returned if the file doesn’t exist, can’t be read, or is corrupted.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">MEMORY_E</span> will be returned if an out of memory condition occurs.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ASN_INPUT_E</span> will be returned if Base16 decoding fails on the file.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">NO_PASSWORD</span> will be returned if the key file is encrypted but no password is provided.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ctx</span> - pointer to the SSL context, created with CyaSSL_CTX_new().<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">in</span> - the input buffer containing the private key to be loaded.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">sz</span> - the size of the input buffer.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">format</span> - the format of the private key located in the input buffer (<span class="style_3">in</span>).  Possible values are SSL_FILETYPE_ASN1 or SSL_FILETYPE_PEM.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_14">int ret = 0;<br/></p>
<p class="paragraph_style_14">int sz = 0;<br/></p>
<p class="paragraph_style_14">CYASSL_CTX* ctx;<br/></p>
<p class="paragraph_style_14">byte keyBuff[...];<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">ret = CyaSSL_CTX_use_PrivateKey_buffer(ctx, keyBuff, sz, SSL_FILETYPE_PEM);<br/></p>
<p class="paragraph_style_14">if (ret != SSL_SUCCESS) {<br/></p>
<p class="paragraph_style_14">// error loading private key from buffer<br/></p>
<p class="paragraph_style_14">}<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_load_verify_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_certificate_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_NTRUPrivateKey_file<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_certificate_chain_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_certificate_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_PrivateKey_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_certificate_chain_buffer<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><br/></p>
<div class="paragraph paragraph_style_10"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_14.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_12"><br/></p>
<p class="paragraph_style_12">CyaSSL_CTX_use_PrivateKey_file<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_10">int CyaSSL_CTX_use_PrivateKey_file(CYASSL_CTX* ctx, const char* file, int format);<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_10">This function loads a private key file into the SSL context (CYASSL_CTX).  The file is provided by the file argument.  The format argument specifies the format type of the file - <span class="style_3">SSL_FILETYPE_ASN1 </span>or <span class="style_3">SSL_FILETYPE_PEM</span>.  Please see the examples for proper usage.   <br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_10">If successful the call will return <span class="style_3">SSL_SUCCESS</span>, otherwise <span class="style_3">SSL_FAILURE</span> will be returned.  If the function call fails, possible causes might include:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10">- The file is in the wrong format, or the wrong format has been given using the “format” argument<br/></p>
<p class="paragraph_style_10">- The file doesn’t exist, can’t be read, or is corrupted<br/></p>
<p class="paragraph_style_10">- An out of memory condition occurs<br/></p>
<p class="paragraph_style_10">- Base16 decoding fails on the file<br/></p>
<p class="paragraph_style_10">- The key file is encrypted but no password is provided<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_14">int ret = 0;<br/></p>
<p class="paragraph_style_14">CYASSL_CTX* ctx;<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">ret = CyaSSL_CTX_use_PrivateKey_file(ctx, “./server-key.pem”, <br/></p>
<p class="paragraph_style_14">                                     SSL_FILETYPE_PEM);<br/></p>
<p class="paragraph_style_14">if (ret != SSL_SUCCESS) {<br/></p>
<p class="paragraph_style_14">// error loading key file<br/></p>
<p class="paragraph_style_14">}<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_PrivateKey_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_PrivateKey_file<br/></p>
<p class="paragraph_style_10">CyaSSL_use_PrivateKey_buffer<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><br/></p>
<div class="paragraph paragraph_style_10"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_15.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_12"><br/></p>
<p class="paragraph_style_12">CyaSSL_CTX_use_certificate_buffer<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_10">int CyaSSL_CTX_use_certificate_buffer(CYASSL_CTX* ctx, const unsigned char* in,                                                                          long sz, int format);<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_10">This function loads a certificate buffer into the CYASSL Context.  It behaves like the non buffered version, only differing in its ability to be called with a buffer as input instead of a file.  The buffer is provided by the <span class="style_3">in</span> argument of size <span class="style_3">sz</span>.  <span class="style_3">format</span> specifies the format type of the buffer; <span class="style_3">SSL_FILETYPE_ASN1or</span> <span class="style_3">SSL_FILETYPE_PEM</span>.  Please see the examples for proper usage.   <br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_10">If successful the call will return <span class="style_3">SSL_SUCCESS</span>.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">SSL_BAD_FILETYPE</span> will be returned if the file is the wrong format.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">SSL_BAD_FILE</span> will be returned if the file doesn’t exist, can’t be read, or is corrupted.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">MEMORY_E</span> will be returned if an out of memory condition occurs.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ASN_INPUT_E</span> will be returned if Base16 decoding fails on the file.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ctx</span> - pointer to the SSL context, created with CyaSSL_CTX_new().<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">in</span> - the input buffer containing the certificate to be loaded.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">sz</span> - the size of the input buffer.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">format</span> - the format of the certificate located in the input buffer (<span class="style_3">in</span>).  Possible values are SSL_FILETYPE_ASN1 or SSL_FILETYPE_PEM.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_14">int ret = 0;<br/></p>
<p class="paragraph_style_14">int sz = 0;<br/></p>
<p class="paragraph_style_14">CYASSL_CTX* ctx;<br/></p>
<p class="paragraph_style_14">byte certBuff[...];<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">ret = CyaSSL_CTX_use_certificate_buffer(ctx, certBuff, sz, SSL_FILETYPE_PEM);<br/></p>
<p class="paragraph_style_14">if (ret != SSL_SUCCESS) {<br/></p>
<p class="paragraph_style_14">// error loading certificate from buffer<br/></p>
<p class="paragraph_style_14">}<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_load_verify_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_PrivateKey_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_NTRUPrivateKey_file<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_certificate_chain_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_certificate_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_PrivateKey_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_certificate_chain_buffer<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><br/></p>
<div class="paragraph paragraph_style_10"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_16.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_12"><br/></p>
<p class="paragraph_style_12">CyaSSL_CTX_use_certificate_chain_buffer<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_10">int CyaSSL_CTX_use_certificate_chain_buffer(CYASSL_CTX* ctx, <br/></p>
<p class="paragraph_style_10">const unsigned char* in,<br/></p>
<p class="paragraph_style_10">long sz);<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_10">This function loads a certificate chain buffer into the CYASSL Context.  It behaves like the non buffered version, only differing in its ability to be called with a buffer as input instead of a file.  The buffer is provided by the <span class="style_3">in</span> argument of size <span class="style_3">sz</span>.  The buffer must be in <span class="style_3">PEM</span> format and start with the subject’s certificate, ending with the root certificate. Please see the examples for proper usage.   <br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_10">If successful the call will return <span class="style_3">SSL_SUCCESS</span>.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">SSL_BAD_FILETYPE</span> will be returned if the file is the wrong format.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">SSL_BAD_FILE</span> will be returned if the file doesn’t exist, can’t be read, or is corrupted.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">MEMORY_E</span> will be returned if an out of memory condition occurs.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ASN_INPUT_E</span> will be returned if Base16 decoding fails on the file.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">BUFFER_E</span> will be returned if a chain buffer is bigger than the receiving buffer.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ctx</span> - pointer to the SSL context, created with CyaSSL_CTX_new().<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">in</span> - the input buffer containing the PEM-formatted certificate chain to be loaded.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">sz</span> - the size of the input buffer.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_14">int ret = 0;<br/></p>
<p class="paragraph_style_14">int sz = 0;<br/></p>
<p class="paragraph_style_14">CYASSL_CTX* ctx;<br/></p>
<p class="paragraph_style_14">byte certChainBuff[...];<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">ret = CyaSSL_CTX_use_certificate_chain_buffer(ctx, certChainBuff, sz);<br/></p>
<p class="paragraph_style_14">if (ret != SSL_SUCCESS) {<br/></p>
<p class="paragraph_style_14">// error loading certificate chain from buffer<br/></p>
<p class="paragraph_style_14">}<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_load_verify_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_certificate_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_PrivateKey_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_NTRUPrivateKey_file<br/></p>
<p class="paragraph_style_10">CyaSSL_use_certificate_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_PrivateKey_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_certificate_chain_buffer<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><br/></p>
<div class="paragraph paragraph_style_10"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_17.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_12"><br/></p>
<p class="paragraph_style_12">CyaSSL_CTX_use_certificate_chain_file<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_10">int CyaSSL_CTX_use_certificate_chain_file(CYASSL_CTX* ctx, const char* file);<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_10">This function loads a chain of certificates into the SSL context (CYASSL_CTX).  The file containing the certificate chain is provided by the <span class="style_3">file</span> argument, and must contain PEM-formatted certificates.  This function will process up to MAX_CHAIN_DEPTH (default = 9, defined in internal.h) certificates, plus the subject cert.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_10">If successful the call will return <span class="style_3">SSL_SUCCESS</span>, otherwise <span class="style_3">SSL_FAILURE</span> will be returned.  If the function call fails, possible causes might include:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10">- The file is in the wrong format, or the wrong format has been given using the “format” argument<br/></p>
<p class="paragraph_style_10">- file doesn’t exist, can’t be read, or is corrupted<br/></p>
<p class="paragraph_style_10">- an out of memory condition occurs<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ctx</span> - a pointer to a CYASSL_CTX structure, created using CyaSSL_CTX_new()<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">file</span> - a pointer to the name of the file containing the chain of certificates to be loaded into the CyaSSL SSL context.  Certificates must be in PEM format.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_14">int ret = 0;<br/></p>
<p class="paragraph_style_14">CYASSL_CTX* ctx;<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">ret = CyaSSL_CTX_use_certificate_chain_file(ctx, “./cert-chain.pem”);<br/></p>
<p class="paragraph_style_14">if (ret != SSL_SUCCESS) {<br/></p>
<p class="paragraph_style_14">// error loading cert file<br/></p>
<p class="paragraph_style_14">}<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_certificate_file<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_certificate_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_certificate_file<br/></p>
<p class="paragraph_style_10">CyaSSL_use_certificate_buffer<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><br/></p>
<div class="paragraph paragraph_style_10"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_18.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_12"><br/></p>
<p class="paragraph_style_12">CyaSSL_CTX_use_certificate_file<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_10">int CyaSSL_CTX_use_certificate_file(CYASSL_CTX* ctx, const char* file, int format);<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_10">This function loads a certificate file into the SSL context (CYASSL_CTX).  The file is provided by the <span class="style_3">file</span> argument.  The <span class="style_3">format</span> argument specifies the format type of the file - either <span class="style_3">SSL_FILETYPE_ASN1</span> or <span class="style_3">SSL_FILETYPE_PEM</span>.  Please see the examples for proper usage.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_10">If successful the call will return <span class="style_3">SSL_SUCCESS</span>, otherwise <span class="style_3">SSL_FAILURE</span> will be returned.  If the function call fails, possible causes might include:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10">- The file is in the wrong format, or the wrong format has been given using the “format” argument<br/></p>
<p class="paragraph_style_10">- file doesn’t exist, can’t be read, or is corrupted<br/></p>
<p class="paragraph_style_10">- an out of memory condition occurs<br/></p>
<p class="paragraph_style_10">- Base16 decoding fails on the file<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ctx</span> - a pointer to a CYASSL_CTX structure, created using CyaSSL_CTX_new()<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">file</span> - a pointer to the name of the file containing the certificate to be loaded into the CyaSSL SSL context.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">format</span> - format of the certificates pointed to by <span class="style_3">file</span>.  Possible options are SSL_FILETYPE_ASN1 or SSL_FILETYPE_PEM.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_14">int ret = 0;<br/></p>
<p class="paragraph_style_14">CYASSL_CTX* ctx;<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">ret = CyaSSL_CTX_use_certificate_file(ctx, “./client-cert.pem”, <br/></p>
<p class="paragraph_style_14">                                      SSL_FILETYPE_PEM);<br/></p>
<p class="paragraph_style_14">if (ret != SSL_SUCCESS) {<br/></p>
<p class="paragraph_style_14">// error loading cert file<br/></p>
<p class="paragraph_style_14">}<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_certificate_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_certificate_file<br/></p>
<p class="paragraph_style_10">CyaSSL_use_certificate_buffer<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_12"><br/></p>
<div class="paragraph paragraph_style_12"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_19.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_12"><br/></p>
<p class="paragraph_style_12"><br/></p>
<p class="paragraph_style_12">CyaSSL_SetTmpDH<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_10">#include &lt;cyassl/ssl.h&gt;<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10">int CyaSSL_SetTmpDH(CYASSL* ssl, unsigned char* p, int pSz, unsigned char* g, <br/></p>
<p class="paragraph_style_10">        int gSz);<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_10">Server Diffie-Hellman Ephemeral parameters setting.  This function sets up the group parameters to be used if the server negotiates a cipher suite that uses DHE.  <br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_10">If successful the call will return <span class="style_3">SSL_SUCCESS</span>.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">MEMORY_ERROR</span> will be returned if a memory error was encountered.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">SIDE_ERROR</span> will be returned if this function is called on an SSL client instead of an SSL server.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ssl</span> - a pointer to a CYASSL structure, created using CyaSSL_new().<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">p</span> - Diffie-Hellman prime number parameter.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">pSz</span> - size of <span class="style_3">p</span>.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">g</span> - Diffie-Hellman “generator” parameter.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">gSz</span> - size of <span class="style_3">g</span>.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_14">CYASSL* ssl;<br/></p>
<p class="paragraph_style_14">static unsigned char p[] = {...};<br/></p>
<p class="paragraph_style_14">static unsigned char g[] = {...};<br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_14">CyaSSL_SetTmpDH(ssl, p, sizeof(p), g, sizeof(g));<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_10">SSL_accept<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><br/></p>
<div class="paragraph paragraph_style_10"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_20.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_11"><br/></p>
<p class="paragraph_style_12">CyaSSL_use_PrivateKey_buffer<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_10">#include &lt;cyassl/ssl.h&gt;<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10">int CyaSSL_use_PrivateKey_buffer(CYASSL* ssl, const unsigned char* in,                                                                  long sz, int format);<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_10">This function loads a private key buffer into the CYASSL object.  It behaves like the non buffered version, only differing in its ability to be called with a buffer as input instead of a file.  The buffer is provided by the in argument of size <span class="style_3">sz</span>.  <span class="style_3">format</span> specifies the format type of the buffer; <span class="style_3">SSL_FILETYPE_ASN1</span> or <span class="style_3">SSL_FILETYPE_PEM</span>.  Please see the examples for proper usage.   <br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Return Values:<span class="style_3"><br/></span></p>
<p class="paragraph_style_10">If successful the call will return <span class="style_3">SSL_SUCCESS</span>.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">SSL_BAD_FILETYPE</span> will be returned if the file is the wrong format.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">SSL_BAD_FILE</span> will be returned if the file doesn’t exist, can’t be read, or is corrupted.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">MEMORY_E</span> will be returned if an out of memory condition occurs.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ASN_INPUT_E</span> will be returned if Base16 decoding fails on the file.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">NO_PASSWORD</span> will be returned if the key file is encrypted but no password is provided.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ssl</span> - pointer to the SSL session, created with CyaSSL_new().<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">in</span> - buffer containing private key to load.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">sz</span> - size of the private key located in <span class="style_3">buffer</span>.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">format</span> - format of the private key to be loaded.  Possible values are SSL_FILETYPE_ASN1 or SSL_FILETYPE_PEM.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_14">int buffSz;<br/></p>
<p class="paragraph_style_14">int ret;<br/></p>
<p class="paragraph_style_14">byte keyBuff[...];<br/></p>
<p class="paragraph_style_14">CYASSL* ssl = 0;<br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">ret = CyaSSL_use_PrivateKey_buffer(ssl, keyBuff, buffSz, SSL_FILETYPE_PEM);<br/></p>
<p class="paragraph_style_14">if (ret != SSL_SUCCESS) {<br/></p>
<p class="paragraph_style_14">// failed to load private key from buffer<br/></p>
<p class="paragraph_style_14">}<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_load_verify_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_certificate_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_PrivateKey_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_NTRUPrivateKey_file<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_certificate_chain_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_certificate_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_certificate_chain_buffer<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><br/></p>
<div class="paragraph paragraph_style_10"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_21.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_12">CyaSSL_use_certificate_buffer<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_10">#include &lt;cyassl/ssl.h&gt;<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10">int CyaSSL_use_certificate_buffer(CYASSL* ssl, const unsigned char* in,                                                               long sz, int format);<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_10">This function loads a certificate buffer into the CYASSL object.  It behaves like the non buffered version, only differing in its ability to be called with a buffer as input instead of a file.  The buffer is provided by the <span class="style_3">in</span> argument of size <span class="style_3">sz</span>.  <span class="style_3">format</span> specifies the format type of the buffer; <span class="style_3">SSL_FILETYPE_ASN1or</span> <span class="style_3">SSL_FILETYPE_PEM</span>.  Please see the examples for proper usage.   <br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_10">If successful the call will return <span class="style_3">SSL_SUCCESS</span>.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">SSL_BAD_FILETYPE</span> will be returned if the file is the wrong format.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">SSL_BAD_FILE</span> will be returned if the file doesn’t exist, can’t be read, or is corrupted.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">MEMORY_E</span> will be returned if an out of memory condition occurs.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ASN_INPUT_E</span> will be returned if Base16 decoding fails on the file.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ssl</span> - pointer to the SSL session, created with CyaSSL_new().<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">in</span> - buffer containing certificate to load.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">sz</span> - size of the certificate located in <span class="style_3">buffer</span>.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">format</span> - format of the certificate to be loaded.  Possible values are SSL_FILETYPE_ASN1 or SSL_FILETYPE_PEM.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_14">int buffSz;<br/></p>
<p class="paragraph_style_14">int ret;<br/></p>
<p class="paragraph_style_14">byte certBuff[...];<br/></p>
<p class="paragraph_style_14">CYASSL* ssl = 0;<br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">ret = CyaSSL_use_certificate_buffer(ssl, certBuff, buffSz, SSL_FILETYPE_PEM);<br/></p>
<p class="paragraph_style_14">if (ret != SSL_SUCCESS) {<br/></p>
<p class="paragraph_style_14">// failed to load certificate from buffer<br/></p>
<p class="paragraph_style_14">}<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_load_verify_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_certificate_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_PrivateKey_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_NTRUPrivateKey_file<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_certificate_chain_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_PrivateKey_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_certificate_chain_buffer<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><br/></p>
<div class="paragraph paragraph_style_10"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_22.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_12">CyaSSL_use_certificate_chain_buffer<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_10">#include &lt;cyassl/ssl.h&gt;<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10">int CyaSSL_use_certificate_chain_buffer(CYASSL* ssl, const unsigned char* in,                                                                           long sz);<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_10">This function loads a certificate chain buffer into the CYASSL object.  It behaves like the non buffered version, only differing in its ability to be called with a buffer as input instead of a file.  The buffer is provided by the in argument of size <span class="style_3">sz</span>.  The buffer must be in <span class="style_3">PEM</span> format and start with the subject’s certificate, ending with the root certificate. Please see the examples for proper usage.   <br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_10">If successful the call will return <span class="style_3">SSL_SUCCESS</span>.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">SSL_BAD_FILETYPE</span> will be returned if the file is the wrong format.<br/></p>
<p class="paragraph_style_15"><br/></p>
<p class="paragraph_style_10"><span class="style_3">SSL_BAD_FILE</span> will be returned if the file doesn’t exist, can’t be read, or is corrupted.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">MEMORY_E</span> will be returned if an out of memory condition occurs.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ASN_INPUT_E</span> will be returned if Base16 decoding fails on the file.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">BUFFER_E</span> will be returned if a chain buffer is bigger than the receiving buffer.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ssl</span> - pointer to the SSL session, created with CyaSSL_new().<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">in</span> - buffer containing certificate to load.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">sz</span> - size of the certificate located in <span class="style_3">buffer</span>.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_14">int buffSz;<br/></p>
<p class="paragraph_style_14">int ret;<br/></p>
<p class="paragraph_style_14">byte certChainBuff[...];<br/></p>
<p class="paragraph_style_14">CYASSL* ssl = 0;<br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">ret = CyaSSL_use_certificate_chain_buffer(ssl, certChainBuff, buffSz);<br/></p>
<p class="paragraph_style_14">if (ret != SSL_SUCCESS) {<br/></p>
<p class="paragraph_style_14">// failed to load certificate chain from buffer<br/></p>
<p class="paragraph_style_14">}<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_load_verify_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_certificate_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_PrivateKey_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_NTRUPrivateKey_file<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_certificate_chain_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_certificate_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_PrivateKey_buffer<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><br/></p>
<div class="paragraph paragraph_style_10"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_23.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_11"><br/></p>
<p class="paragraph_style_12">CyaSSL_CTX_der_load_verify_locations<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_10">#include &lt;cyassl/ssl.h&gt;<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10">int CyaSSL_CTX_der_load_verify_locations(CYASSL_CTX* ctx, const char* file,<br/></p>
<p class="paragraph_style_10">                                                                                 int format);<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_10">This function is similar to CyaSSL_CTX_load_verify_locations, but allows the loading of DER-formatted CA files into the SSL context (CYASSL_CTX).  It may still be used to load PEM-formatted CA files as well.  These certificates will be treated as trusted root certificates and used to verify certs received from peers during the SSL handshake.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10">The root certificate file, provided by the <span class="style_3">file</span> argument, may be a single certificate or a file containing multiple certificates.  If multiple CA certs are included in the same file, CyaSSL will load them in the same order they are presented in the file.  The <span class="style_3">format</span> argument specifies the format which the certificates are in - either SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1 (DER).  Unlike CyaSSL_CTX_load_verify_locations, this function does not allow the loading of CA certificates from a given directory path.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10">Note that this function is only available when the CyaSSL library was compiled with <span class="style_4">CYASSL_DER_LOAD</span> defined.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Return Values:<span class="style_3"><br/></span></p>
<p class="paragraph_style_10">If successful the call will return <span class="style_3">SSL_SUCCESS</span>, otherwise <span class="style_3">SSL_FAILURE</span> will be returned upon failure.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ctx</span> - a pointer to a CYASSL_CTX structure, created using CyaSSL_CTX_new()<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">file</span> - a pointer to the name of the file containing the CA certificates to be loaded into the CyaSSL SSL context, with format as specified by <span class="style_3">format</span>.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">format</span> - the encoding type of the certificates specified by <span class="style_3">file</span>.  Possible values include SSL_FILETYPE_PEM and SSL_FILETYPE_ASN1.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_14">int ret = 0;<br/></p>
<p class="paragraph_style_14">CYASSL_CTX* ctx;<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">ret = CyaSSL_CTX_der_load_verify_locations(ctx, “./ca-cert.der”, <br/></p>
<p class="paragraph_style_14">                                           SSL_FILETYPE_ASN1);<br/></p>
<p class="paragraph_style_14">if (ret != SSL_SUCCESS) {<br/></p>
<p class="paragraph_style_14">// error loading CA certs<br/></p>
<p class="paragraph_style_14">}<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_load_verify_locations<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_load_verify_buffer<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><br/></p>
<div class="paragraph paragraph_style_10"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_24.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_11"><br/></p>
<p class="paragraph_style_12">CyaSSL_CTX_use_NTRUPrivateKey_file<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_10">#include &lt;cyassl/ssl.h&gt;<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10">int CyaSSL_CTX_use_NTRUPrivateKey_file(CYASSL_CTX* ctx, const char* file);<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_10">This function loads an NTRU private key file into the CYASSL Context.  It behaves like the normal version, only differing in its ability to accept an NTRU raw key file.   This function is needed since the format of the file is different than the normal key file (buffer) functions.  Please see the examples for proper usage.   <br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_10">If successful the call will return <span class="style_3">SSL_SUCCESS</span>.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">SSL_BAD_FILE</span> will be returned if the file doesn’t exist, can’t be read, or is corrupted.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">MEMORY_E</span> will be returned if an out of memory condition occurs.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ASN_INPUT_E</span> will be returned if Base16 decoding fails on the file.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">BUFFER_E</span> will be returned if a chain buffer is bigger than the receiving buffer.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">NO_PASSWORD</span> will be returned if the key file is encrypted but no password is provided.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ctx</span> - a pointer to a CYASSL_CTX structure, created using CyaSSL_CTX_new()<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">file</span> - a pointer to the name of the file containing the NTRU private key to be loaded into the CyaSSL SSL context.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_14">int ret = 0;<br/></p>
<p class="paragraph_style_14">CYASSL_CTX* ctx;<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">ret = CyaSSL_CTX_use_NTRUPrivateKey_file(ctx, “./ntru-key.raw”);<br/></p>
<p class="paragraph_style_14">if (ret != SSL_SUCCESS) {<br/></p>
<p class="paragraph_style_14">// error loading NTRU private key<br/></p>
<p class="paragraph_style_14">}<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_load_verify_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_certificate_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_PrivateKey_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_CTX_use_certificate_chain_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_certificate_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_PrivateKey_buffer<br/></p>
<p class="paragraph_style_10">CyaSSL_use_certificate_chain_buffer<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><br/></p>
<div class="paragraph paragraph_style_10"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_25.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_11"><br/></p>
<p class="paragraph_style_12">CyaSSL_KeepArrays<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_10">#include &lt;cyassl/ssl.h&gt;<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10">void CyaSSL_KeepArrays(CYASSL* ssl);<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_10">Normally, at the end of the SSL handshake, CyaSSL frees temporary arrays.  Calling this function before the handshake begins will prevent CyaSSL from freeing temporary arrays.  Temporary arrays may be needed for things such as CyaSSL_get_keys() or PSK hints.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10">When the user is done with temporary arrays, either CyaSSL_FreeArrays() may be called to free the resources immediately, or alternatively the resources will be freed when the associated SSL object is freed.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_10">This function has no return value.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ssl</span> - a pointer to a CYASSL structure, created using CyaSSL_new().<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_14">CYASSL* ssl;<br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_14">CyaSSL_KeepArrays(ssl);<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_10">CyaSSL_FreeArrays<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><br/></p>
<div class="paragraph paragraph_style_15"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_26.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_11"><br/></p>
<p class="paragraph_style_12">CyaSSL_FreeArrays<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_10">#include &lt;cyassl/ssl.h&gt;<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10">void CyaSSL_FreeArrays(CYASSL* ssl);<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_10">Normally, at the end of the SSL handshake, CyaSSL frees temporary arrays.  If CyaSSL_KeepArrays() has been called before the handshake, CyaSSL will not free temporary arrays.  This function explicitly frees temporary arrays and should be called when the user is done with temporary arrays and does not want to wait for the SSL object to be freed to free these resources.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_10">This function has no return value.<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><span class="style_3">ssl</span> - a pointer to a CYASSL structure, created using CyaSSL_new().<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_14">CYASSL* ssl;<br/></p>
<p class="paragraph_style_14">...<br/></p>
<p class="paragraph_style_14">CyaSSL_FreeArrays(ssl);<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_10">CyaSSL_KeepArrays<br/></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><br/></p>
<div class="paragraph paragraph_style_10"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_27.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
</div>
<div style="clear: both; height: 0px; line-height: 0px; " class="tinyText"> </div>
</div>
</div>
<div style="height: 16px; width: 20px;  height: 16px; left: 706px; position: absolute; top: 51px; width: 20px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 20px; ">
<img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/shapeimage_28.png" alt="" style="height: 16px; left: 0px; position: absolute; top: 0px; width: 20px; "/>
</div>
</div>
<div style="height: 19px; width: 19px;  height: 19px; left: 707px; position: absolute; top: 25px; width: 19px; z-index: 1; " class="tinyText style_SkipStroke_2">
<img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/United%20Kingdom(Great%20Britain).png" alt="" style="border: none; height: 19px; width: 19px; "/>
</div>
<div id="id17" style="height: 23px; left: 328px; position: absolute; top: 48px; width: 258px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_258_23" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_16">Questions? +1 (425) 245-8247</p>
</div>
</div>
</div>
<div style="height: 19px; width: 19px;  height: 19px; left: 685px; position: absolute; top: 25px; width: 19px; z-index: 1; " class="tinyText style_SkipStroke_2">
<a href="http://www.wolfssl.jp/" title="http://www.wolfssl.jp"><img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/japan.png" alt="" style="border: none; height: 19px; width: 19px; "/></a>
</div>
<div id="id18" style="height: 28px; left: 593px; position: absolute; top: 44px; width: 119px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_119_28" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_17"><a class="class14" title="https://www.wolfssl.com/forums" href="https://www.wolfssl.com/forums">Support <span class="style_5">Forums</span></a></p>
</div>
</div>
</div>
<div style="height: 121px; width: 155px;  height: 121px; left: 32px; position: absolute; top: 5px; width: 155px; z-index: 1; " class="tinyText style_SkipStroke_2">
<a href="Home.html" title="Home.html"><img src="Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys_files/wolfssl_logo.png" alt="" style="border: none; height: 121px; width: 156px; "/></a>
</div>
<div style="height: 12504px; line-height: 12504px; " class="spacer"> </div>
</div>
<div style="height: 100px; margin-left: 0px; position: relative; width: 770px; z-index: 15; " id="footer_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
<div id="id19" style="height: 27px; left: 634px; position: absolute; top: 27px; width: 102px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_102_27" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_4"><a class="class15" title="Docs-wolfssl-manual-17-3-wolfssl-api-context-session-setup.html" href="Docs-wolfssl-manual-17-3-wolfssl-api-context-session-setup.html">Next Chapter</a></p>
</div>
</div>
</div>
<div id="id20" style="height: 25px; left: 35px; position: absolute; top: 27px; width: 125px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_125_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_18"><a class="class16" title="Docs-wolfssl-manual-17-1-wolfssl-api-init-shutdown.html" href="Docs-wolfssl-manual-17-1-wolfssl-api-init-shutdown.html">Previous Chapter</a></p>
</div>
</div>
</div>
<div id="id21" style="height: 25px; left: 323px; position: absolute; top: 27px; width: 125px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_125_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_7"><a class="class17" title="Docs-wolfssl-manual-toc.html" href="Docs-wolfssl-manual-toc.html">Table of Contents</a></p>
</div>
</div>
</div>
<div id="id22" style="height: 29px; left: 35px; position: absolute; top: 65px; width: 701px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_701_29" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_19">Copyright 2017 wolfSSL Inc.  All rights reserved.</p>
</div>
</div>
</div>
</div>
</div>
</div>
 </body>

<!-- Mirrored from www.wolfssl.com/wolfSSL/Docs-wolfssl-manual-17-2-wolfssl-api-certificates-keys.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Jan 2017 13:33:22 GMT -->
</html>
